package com.cc8w.home.controller;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cc8w.admins.service.ProductClassService;
import com.cc8w.entity.CategoryEntity;

@Controller(value="homeIndexController")
@RequestMapping("/home/index")
public class IndexController {
    @Autowired
    private ProductClassService productClassService;
    /**
     * 首页数据
     * @return
     */
    @RequestMapping("index")
    public String index(){
        //1.获得分类
        //2.获得产品
        //3.获得轮播(可以是静态数据)

        return null;
    }
    /**
     * 获得指定分类产品
     * @return
     */
    @RequestMapping("cat")
    public @ResponseBody List<CategoryEntity> getGoodsByCat(){

        //2.获取产品分类
        List<CategoryEntity> catList = productClassService.getGoodsCat();
        return catList;
    }


    /**
     * 产品详情
     */
    public String getGoodsDetail(){


        return null;
    }

    /**
     * 获取产品某种属性组合的价格
     */
    public String getGoodsPrice(){

        return null;
    }

    /**
     *
     */


}
